cmake_minimum_required(VERSION 3.9)

if(NOT BINARY_NAME)
    set(BINARY_NAME openttd)
endif()

project(${BINARY_NAME})

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
    message(FATAL_ERROR "In-source builds not allowed. Please run \"cmake ..\" from the bin directory")
endif()


set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")

##list(APPEND GENERATED_SOURCE_FILES) 

include(SourceList)

add_executable(openttd )

add_subdirectory(${CMAKE_SOURCE_DIR}/src)


